package com.foreknow.demo5;

public class TestSingleton {
    //常量
    public static final String NAME = "tom";

    public static void main(String[] args) {
        Singleton singleton = Singleton.getInstance();
        singleton.setName(NAME);
        System.out.println(singleton.getName());

        Singleton sin = Singleton.getInstance();
        System.out.println(sin.getName());
    }
}
